package com.lzh.crm.service.impl;

import com.lzh.crm.mapper.OrderMapper;
import com.lzh.crm.pojo.Order;
import com.lzh.crm.pojo.OrderDTO;
import com.lzh.crm.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public void insert(Order order) {
        orderMapper.insert(order);
    }

    @Override
    public void delete(Integer orderId) {
        orderMapper.delete(orderId);
    }

    @Override
    public void update(Order order) {
        orderMapper.update(order);
    }

    @Override
    public List<OrderDTO> selectAll() {
        return orderMapper.selectAll();
    }

    @Override
    public List<OrderDTO> selectNeed(OrderDTO orderDTO) {
        return orderMapper.selectNeed(orderDTO);
    }

}
